package model

import "github.com/hwcer/cosgo/values"

// Json 用于列表显示，非并发安全，禁止使用容器特别是MAP
func (this *Role) Json() values.Values {
	v := values.Values{}
	v.Set("_id", this.Uid)
	v.Set("lv", this.Lv)
	v.Set("name", this.Name)
	v.Set("icon", this.Icon)
	v.Set("iconFrame", this.IconFrame)
	//星光体绰号
	reputation := append([]int32{0}, this.Reputation...)
	v.Set("reputation", reputation)

	return v
}
